package com.ruoyi.basicInfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicInfo.mapper.UnitPlanMapper;
import com.ruoyi.basicInfo.domain.UnitPlan;
import com.ruoyi.basicInfo.service.IUnitPlanService;

import javax.annotation.Resource;

/**
 * 煤矿外购运输计划Service业务层处理
 * 
 * @author zbw
 * @date 2022-07-16
 */
@Service
public class UnitPlanServiceImpl implements IUnitPlanService 
{
    @Resource
    private UnitPlanMapper unitPlanMapper;

    /**
     * 查询煤矿外购运输计划
     * 
     * @param id 煤矿外购运输计划主键
     * @return 煤矿外购运输计划
     */
    @Override
    public UnitPlan selectUnitPlanById(String id)
    {
        return unitPlanMapper.selectUnitPlanById(id);
    }

    /**
     * 查询煤矿外购运输计划列表
     * 
     * @param unitPlan 煤矿外购运输计划
     * @return 煤矿外购运输计划
     */
    @Override
    public List<UnitPlan> selectUnitPlanList(UnitPlan unitPlan)
    {
        return unitPlanMapper.selectUnitPlanList(unitPlan);
    }

    /**
     * 新增煤矿外购运输计划
     * 
     * @param unitPlan 煤矿外购运输计划
     * @return 结果
     */
    @Override
    public int insertUnitPlan(UnitPlan unitPlan)
    {
        return unitPlanMapper.insertUnitPlan(unitPlan);
    }

    /**
     * 修改煤矿外购运输计划
     * 
     * @param unitPlan 煤矿外购运输计划
     * @return 结果
     */
    @Override
    public int updateUnitPlan(UnitPlan unitPlan)
    {
        return unitPlanMapper.updateUnitPlan(unitPlan);
    }

    /**
     * 批量删除煤矿外购运输计划
     * 
     * @param ids 需要删除的煤矿外购运输计划主键
     * @return 结果
     */
    @Override
    public int deleteUnitPlanByIds(String[] ids)
    {
        return unitPlanMapper.deleteUnitPlanByIds(ids);
    }

    /**
     * 删除煤矿外购运输计划信息
     * 
     * @param id 煤矿外购运输计划主键
     * @return 结果
     */
    @Override
    public int deleteUnitPlanById(String id)
    {
        return unitPlanMapper.deleteUnitPlanById(id);
    }
}
